package Test6;

public class Teacher extends Person{
    private String teachNum;
    private double salary;
    private String job;
    private String site;

    public Teacher() {
    }
    public Teacher(String name, String sex, int age, String teachNum, double salary, String job, String site) {
        super(name, sex, age);
        this.teachNum = teachNum;
        this.salary = salary;
        this.job = job;
        this.site = site;
    }

    public String getTeachNum() {
        return teachNum;
    }
    public void setTeachNum(String teachNum) {
        this.teachNum = teachNum;
    }
    public double getSalary() {
        return salary;
    }
    public void setSalary(double salary) {
        this.salary = salary;
    }
    public String getJob() {
        return job;
    }
    public void setJob(String job) {
        this.job = job;
    }
    public String getSite() {
        return site;
    }
    public void setSite(String site) {
        this.site = site;
    }

    @Override
    public String toString() {
        return "姓名:"+super.getName()+"，性别:"+super.getSex()+"，年龄:"+super.getAge()+" 工号:"+this.getTeachNum()+"、薪水:"+this.getSalary()+"、职称:"+this.getJob()+"，部门:"+this.getSite();
    }
}
